﻿using System;

/*
Sort 3 real values in descending order using nested if statements.
 */

class Sort3NumbersDescending
{
    static void Main(string[] args)
    {
        double a = 1.13;
        double b = -3.2;
        double c = 54;
        Console.WriteLine("Initial Values: a = {0} , b= {1} , c= {2}", a, b, c);

        if (a > b)
        {
            if (a > c)
            {
                if (b > c)
                {
                    //a,b,c
                    Console.WriteLine("Sorted Values: a = {0} , b= {1} , c= {2}", a, b, c);
                }
                else
                {
                    //a,c,b
                    Console.WriteLine("Sorted Values: a = {0} , b= {1} , c= {2}", a, c, b);
                }
            }
            else
            {
                //c,a,b
                Console.WriteLine("Sorted Values: a = {0} , b= {1} , c= {2}", c, a, b);
            }
        }
        else
        {
            if (a > c)
            {
                //b,a,c
                Console.WriteLine("Sorted Values: a = {0} , b= {1} , c= {2}", b, a, c);
            }
            //c,b,a
            Console.WriteLine("Sorted Values: a = {0} , b= {1} , c= {2}", c, b, a);
            
        }
    }
}

